<template>
    <page-layout>
        <template v-slot:header>
            <el-button @click="returnEvt" type="primary" size="small">返回</el-button>
        </template>
        <el-form :model="page" 
                :rules="rules" 
                size="small"
                ref="ruleForm" 
                label-width="100px" 
                class="demo-ruleForm"
                :inline-message="true">
                <el-row>
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="运营名字" prop="name">
                            <el-input readonly v-model="page.name"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="产品名字" prop="brand">
                            <el-input readonly v-model="page.product_name"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="运营价格" prop="type">
                            <el-input readonly v-model="page.price"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="成本价格" prop="unit">
                            <el-input readonly v-model="page.pure_price"/>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="投放数量" prop="level">
                            <el-input readonly v-model="page.count"/>
                        </el-form-item>
                    </el-col>
                    
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="限购数量" prop="place">
                            <el-input readonly v-model="page.limit"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="上架时间" prop="sale_stime">
                            <el-input readonly v-model="page.sale_stime"/>
                        </el-form-item>
                    </el-col>
                    <el-col :xs="24" :sm="12" :md="8">
                        <el-form-item label="下架时间" prop="sale_etime">
                            <el-input readonly v-model="page.sale_etime"/>
                        </el-form-item>
                    </el-col>

                    <el-col :span="24">
                        <el-form-item label="运营区域" prop="detail">
                            <el-input readonly v-model="page.address"/>
                        </el-form-item>
                    </el-col>
                    <el-col :span="24">
                        <el-form-item label="备注" prop="remark">
                            <el-input readonly type="textarea" v-model="page.remark"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
            </el-form>
    </page-layout>
</template>
<script>
export default {
    data() {
        return {
            page:{},
            rules:{}
        }
    },
    mounted(){
        if(localStorage.getItem('rangeFlag')==='true')
        {
            this.page=this.$store.getters['common/rangeList']
        }
        localStorage.removeItem('rangeFlag')
    },
    methods:{
        detailEvt(){
            console.log(this.$store.getters['common/rangeList'])
        },
        returnEvt(){
            this.$router.go(-1)
        }
    }
}
</script>